{# One card per instance behind the page (ui_runtime.containers), or why there is nothing to show: the name, its state, uptime, restarts and image in the header (and its Restart, which confirms first), then its live figures as a fixed strip, so a value changing width moves nothing else (CPU and memory in their tone past a threshold). Rendered in the page and again for each SSE frame. #} {% from "components/macros/layout.html" import stats_strip %} {% from "pages/overseer/_glance_macros.html" import restart, state, uptime %} {% if container.pending %} {# data-pending keeps the bar along the top running until the cards land. #}

{{ container.note }}

{% elif container.note %}

{{ container.note }}

{% else %}
{% for row in container.rows %}

{{ row.name }}

{{ state(row) }} {% if row.health and row.health != row.state %}{{ row.health }}{% endif %} {{ uptime(row) }} {% if row.restarts != "-" %}{{ row.restarts }} restarts{% endif %} {{ row.image }} {{ restart(row) }}
{{ stats_strip([ {"label": figure_names.cpu, "value": row.cpu, "tone": row.cpu_tone if row.cpu_tone != "ok"}, {"label": figure_names.memory, "value": row.memory_used, "caption": ("of " ~ row.memory_limit ~ " ยท " ~ row.memory_percent ~ "%") if row.memory_percent is not none else none, "tone": row.memory_tone if row.memory_tone != "ok"}, {"label": figure_names.network, "value": row.network_in ~ " in", "caption": row.network_out ~ " out"}, {"label": figure_names.disk, "value": row.disk_read ~ " read", "caption": row.disk_write ~ " write"}, ]) }}
{% endfor %}
{% endif %}